<include file="../header"/>
<style>

</style>
<div class="wrapper">
    <div class="header text-center font-16">
        详情
        <div class="iconfont icon-zuo go_index"></div>
    </div>
    <div class="padding-12 gray"><span class="iconfont icon-dingdanzhuangtai"></span>订单状态</div>
    <div class="box">
        <div class="circle-box">
            <div class="line"></div>
            <div class="course font-12 flex-between ">
                <!-- 第一个状态点 -->
                <div class="details active">
                    <div class=" circle">
                        <div class="min-circle"></div>
                    </div>
                    <p>已下单</p>
                </div>
                <!-- 第二个状态点 -->
                <if condition="$data.status gt 2 OR $data.status eq 0">
                    <div class="details active">
                        <div class=" circle">
                            <div class="min-circle"></div>
                        </div>
                        <p>已接单</p>
                    </div>
                    <else/>
                    <div class="details">
                        <div class=" circle">
                            <div class="min-circle"></div>
                        </div>
                        <p>待接单</p>
                    </div>
                </if>
                <!-- 第三个状态点 -->
                <if condition="$data.status eq 4 and $data.hang_up eq 1">
                    <div class="details active">
                        <div class=" circle ">
                            <div class="min-circle"></div>
                        </div>
                        <p>已挂起</p>
                    </div>
                    <elseif condition="$data.status eq 5 or $data.status eq 6"/>
                    <div class="details active">
                        <div class=" circle ">
                            <div class="min-circle"></div>
                        </div>
                        <p>已维修</p>
                    </div>
                </if>
                <!--   四个进度的页面-->
                <if condition="$data.status eq 5 and $data.status neq 6">
                    <div class="details">
                        <div class=" circle ">
                            <div class="min-circle"></div>
                        </div>
                        <p>待评价</p>
                    </div>
                    <elseif condition="$data.status eq 6"/>
                    <div class="details active">
                        <div class=" circle ">
                            <div class="min-circle"></div>
                        </div>
                        <p>已评价</p>
                    </div>
                    <elseif condition="$data.status eq 0"/>
                    <div class="details active">
                        <div class=" circle ">
                            <div class="min-circle"></div>
                        </div>
                        <p>已取消</p>
                    </div>
                    <else/>
                    <div class="details">
                        <div class=" circle ">
                            <div class="min-circle"></div>
                        </div>
                        <p>待维修</p>
                    </div>
                </if>
            </div>
        </div>
    </div>
    <div class="history-list">

        <div class="repair-list">
            <volist name="workerInfo" id="vo">
                <div class="flex gray">
                    <div class="width-50">维修工：{BEESCRM:$vo['real_name']}</div>
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    <span class="width-50">手机号：{BEESCRM:$vo['mobile']}</span>
                </div>
            </volist>
        </div>

        <div class="repair-list">
            <div class="clearfix">
                <div class="width-82">报修人：</div>
                <span class="font-16"><if condition="$data.real_name">{BEESCRM:$data.real_name}<else/> </if> </span>
                <span class="pull-right font-16"><if condition="$data.mobile neq 0">{BEESCRM:$data.mobile}<else/> </if></span>
            </div>
            <div class="margin-t4">
                <div class="width-82">报修地址：</div>
                <span class="font-16">{BEESCRM:$data.community_name}{BEESCRM:$data.building_name}{BEESCRM:$data.floor_name}{BEESCRM:$data.room_name}</span>
            </div>
        </div>
        <div class="flex-between repair-list">
            <div>
                <p>
                    <if condition="$data.type eq 2">
                        <span class="width-82">公共报修:  </span><span class="font-16">{BEESCRM:$data.public_name}</span>
                        <else/>
                        <span class="width-82">报修项目：</span><span class="font-16" id="project"
                                                                 data-price="{BEESCRM:$data.goods_amount}">{BEESCRM:$data.project_name}  {BEESCRM:$data.project_child_name}</span>
                    </if>
                </p>
                <p class="margin-t4">
                    <span class="width-82">描述：</span><span class="font-16">{BEESCRM:$data.content}</span>
                </p>
            </div>
            <div class="images">
                <img class="js_images" src="{BEESCRM:$data.image}" alt="">
            </div>
        </div>


        <div class="repair-list">
            <!--挂起状态-->
            <if condition="$data.hang_up eq 1">
                <if condition="$data.hang_reason">
                    <p>
                        <span class="width-82">挂单原因：</span><span class="font-16">{BEESCRM:$data.hang_reason}</span>
                    </p>
                </if>
                <p>
                    <span class="width-82">挂单描述：</span><span class="font-16">{BEESCRM:$data.hang_remark}</span>
                </p>
            </if>
            <!--维修工撤销状态-->
            <if condition="$data.status eq 0">
                <if condition="$data.cancel_reason">
                    <p>
                        <span class="width-82">取消原因：</span><span class="font-16">{BEESCRM:$data.cancel_reason}</span>
                    </p>
                </if>
                <if condition="$data.cancel_remark">
                    <p>
                        <span class="width-82">取消描述：</span><span class="font-16">{BEESCRM:$data.cancel_remark}</span>
                    </p>
                </if>
            </if>
            <if condition="$data.status egt 5">
                <p>
                    <span class="width-82">维修数量：</span><span class="font-16">{BEESCRM:$data.goods_num}</span>
                </p>
            </if>
            <p class="margin-t4">
            <div class="width-82">报修费用：</div>
            <span class="money">
                    <span class="iconfont icon-qian01 font-12"></span><span class="font-16" id="order_amount">{BEESCRM:$data.order_amount}</span></span>
            </p>
        </div>

        <!--<if condition="$data.status egt 5">
            <div class="flex-between repair-list">
                <div>
                    <p>
                        <span class="width-82">维修图片：</span>
                    </p>
                </div>
                <div class="images">
                    <img class="js_images" src="{BEESCRM:$data.finish_image}" alt="">
                </div>
            </div>
        </if>-->
    </div>

    <!--已完成-->
    <if condition="$data.is_comment eq 1">
        <div class="history-list evaluate-box">
            <div class="evaluate">
                <span class="width-82">服务态度：</span>
                <for start="1" end="6" name="i">
                    <if condition="$data.service_star egt $i">
                        <span class="iconfont xingxing icon-xingxing"></span>&nbsp;&nbsp;
                        <else/>
                        <span class="iconfont icon-xingxing"></span>&nbsp;&nbsp;
                    </if>
                </for>
            </div>
            <div class="evaluate">
                <span class="width-82">维修质量：</span>
                <for start="1" end="6" name="i">
                    <if condition="$data.quality_star egt $i">
                        <span class="iconfont xingxing icon-xingxing"></span>&nbsp;&nbsp;
                        <else/>
                        <span class="iconfont icon-xingxing"></span>&nbsp;&nbsp;
                    </if>
                </for>
            </div>
            <div class="evaluate">
                <span class="width-82">响应速度：</span>
                <for start="1" end="6" name="i">
                    <if condition="$data.answer_star egt $i">
                        <span class="iconfont xingxing icon-xingxing"></span>&nbsp;&nbsp;
                        <else/>
                        <span class="iconfont icon-xingxing"></span>&nbsp;&nbsp;
                    </if>
                </for>
            </div>
            <div class="evaluate">
                <span class="width-82">描述：</span>
                <span class="font-16">{BEESCRM:$data.comment}</span>
            </div>
        </div>
    </if>

    <if condition="$data.status eq 3 OR $data.status eq 4">
        <!--<div class="addimg clearfix repair-list" id="repair_worker_image">
            <div class="load-img pull-left" id="repair_image">
                <div class="img">
                    <div class="load text-center">
                        +
||||||| .r32352
    <div class="history-list">
        <div class="addimg clearfix repair-list" id="repair_worker_image">
            <div class="load-img pull-left" id="repair_image">
                <div class="img">
                    <div class="load text-center">
                        +

        <!--     <div class="history-list">
                 <div class="addimg clearfix repair-list" id="repair_worker_image">
                     <div class="load-img pull-left" id="repair_image">
                         <div class="img">
                             <div class="load text-center">
                                 +
                             </div>
                         </div>
                     </div>
                 </div>
                 <if condition="$data.type neq 2">
                 <div class="repair-list gray2">
                     <select name="project_child_id" id="project_child_id">
                         <volist name="project" id="vo">
                             <option data-cost="{BEESCRM:$vo.cost}" value="{BEESCRM:$vo.project_id}" <if condition="$vo.project_id eq $data.project_child_id">selected</if>>{BEESCRM:$vo.project_name}</option>
                         </volist>
                     </select>
                     <div class="iconfont icon-zuo-copy "></div>
                 </div>
                 <div class="repair-list clearfix">
                     <div class="quantity pull-right">
                         <span class="iconfont icon-jian" id="goods_num_decr"></span>
                         <input id="goods_num" type="number" value="1">
                         <span class="iconfont icon-plus-copy" id="goods_num_incr"></span>
                     </div>
                 </div>
                 </if>
             </div>-->
        <div class="history-list">
            <div class="repair-list repair_list">
                <div class="flex-between">
                    <div>
                        报修项目
                    </div>
                    <div class="iconfont icon-jia js_add"></div>
                </div>
                <div class="add_box gray">
                    <div class="repair-list">
                        <div class="flex-between select_choose">

                            <select name="project_child_id" id="project_child_id" class="project_child_id">
                                <volist name="project" id="vo">
                                    <option data-cost="{BEESCRM:$vo.cost}" value="{BEESCRM:$vo.project_id}" <if condition="$vo.project_id eq $data.project_child_id">selected</if>>{BEESCRM:$vo.project_name}（￥{BEESCRM:$vo.cost}）</option>
                                </volist>
                            </select>
                            <div class="iconfont icon-zuo-copy iconfont-zuo"></div>
                        </div>
                    </div>
                    <div class="repair-list">
                        <div class="flex-between">
                            选择数量
                            <div class="quantity flex">
                                <a href="#" class="iconfont icon-jian goods_num_decr gray2"></a>
                                <input type="number" class="gray2 goods_num" value="1">
                                <a href="#" class="iconfont icon-plus-copy goods_num_incr gray2"></a>
                            </div>
                        </div>
                    </div>
                    <div class="repair-list">
                        <a href="#" class="pull-right js_del gray">
                            <span class="iconfont icon-icon_delete"></span> 删除项目
                        </a>
                    </div>
                </div>
            </div>
        </div>
    </if>


    <div style="padding-bottom:20px">
        <if condition="$data.status eq 2">
            <div class="flex-between maintainer_btn">
                <a href="#" class="btn text-center btn-left cancel" style="width: 35%;">撤销</a>
                <a href="#" class="btn text-center btn-right confirm_taking is_tak " style="width: 50%;">确认接单</a>
            </div>
            <elseif condition="$data.status eq 3"/>
            <div class="flex-between maintainer_btn">
                <a href="#" class="btn text-center btn-left wait">挂起</a>&nbsp;&nbsp;
                <a href="#" class="btn text-center btn-right confirm_finish is_con">确认完成</a>&nbsp;&nbsp;
            </div>
            <elseif condition="$data.status eq 4"/>
            <a href="#" class="btn text-center order_receiving confirm_finish is_con">确认完成</a>
        </if>
    </div>

    <!--   //待接单的弹窗 挂起-->
    <div class="pop-box hide" id="js_guaqi">
        <div class="pop-hint pop-explain text-center">
            <div class="delete">
                <img src="/assets/repaireast/images/xiugai.png" alt="">
            </div>
            <div class="repair-list gray2 font-12" style="margin: 0 10px 10px 10px;">
                <select name="remark_id" id="gua_id">
                    <option value="0">请选择挂起原因：</option>
                    <volist name="hangReason" id="vo">
                        <option value="{BEESCRM:$vo.reason_id}">{BEESCRM:$vo.content}</option>
                    </volist>
                </select>
                <div class="iconfont icon-zuo-copy "></div>
            </div>
            <textarea class="textarea_explain font-12" name="hang_remark" id="hang_remark" cols="30" rows="10"
                      placeholder="请输入挂起情况说明"></textarea>
            <div class="text-center pop-btn flex">
                <a href="#" class="no">取消</a>
                <a href="#" class="yes btn-visit is_gua">确定</a>
            </div>
            <div class="iconfont icon-cheng1"></div>
        </div>
    </div>

    <div class="pop-box hide pop-tab" id="pop-img">
        <div class="table-cell">
            <div class="pop-images">
                <img class="js_pop-img" src="" alt="">
                <div class="pop-close iconfont  icon-cheng1">
                </div>

            </div>
        </div>
    </div>

    <!--   //待接单的弹窗 撤销-->
    <div class="pop-box hide" id="js_cancel">
        <div class="pop-hint pop-explain text-center">
            <div class="delete">
                <img src="/assets/repaireast/images/xiugai.png" alt="">
            </div>
            <div class="repair-list gray2 font-12" style="margin: 0 10px 10px 10px;">
                <select name="cancel_id" id="cancel_id">
                    <option value="0">请选择撤销原因：</option>
                    <volist name="cancelReason" id="vo">
                        <option value="{BEESCRM:$vo.reason_id}">{BEESCRM:$vo.content}</option>
                    </volist>
                </select>
                <div class="iconfont icon-zuo-copy "></div>
            </div>
            <textarea class="textarea_explain font-12" name="cancel_remark" id="cancel_remark" cols="30" rows="10"
                      placeholder="请输入撤销情况说明"></textarea>
            <div class="text-center pop-btn flex">
                <a href="#" class="no">取消</a>
                <a href="#" class="yes btn-visit is_gua">确定</a>
            </div>
            <div class="iconfont icon-cheng1"></div>
        </div>
    </div>
</div>
<input type="hidden" id="serverId" value="">
<input type="hidden" id="order_id" value="{BEESCRM:$data.order_id}">
<include file="../getphotos"/>
<script src="/assets/repaireast/js/layer.js"></script>
<script src="/assets/repaireast/js/public.js"></script>
<script type="text/javascript" src="/assets/bower_components/upload/jquery.ui.widget.js"></script>
<script type="text/javascript" src="/assets/bower_components/upload/jquery.fileupload.js"></script>
<script type="text/javascript" src="/assets/bower_components/upload/jquery.iframe-transport.js"></script>
<script>
    $(function () {
        $('.js_add').click(function () {
            var _html = ' <div class="add_box gray"> ' +
                    '<div class="repair-list"> ' +
                    '<div class="flex-between select_choose"> ' +
                    '<select name="project_child_id" id="project_child_id" class="project_child_id"> ' +
                    '<option value="0">请选择报修项目</option> ' +
                    '<volist name="project" id="vo">'+
                    '<option data-cost="{BEESCRM:$vo.cost}" value="{BEESCRM:$vo.project_id}">{BEESCRM:$vo.project_name}（￥{BEESCRM:$vo.cost})</option>'+
                    '</volist>'+
                    '</select> ' +
                    '<div class="iconfont icon-zuo-copy iconfont-zuo"></div> ' +
                    '</div> ' +
                    '</div> ' +
                    '<div class="repair-list"> ' +
                    '<div class="flex-between">' +
                    '选择数量 ' +
                    '<div class="quantity flex"> ' +
                    '<a href="#" class="iconfont icon-jian goods_num_decr gray2"></a> ' +
                    '<input type="number" class="gray2 goods_num" value="1"> ' +
                    '<a href="#" class="iconfont icon-plus-copy goods_num_incr gray2"></a> ' +
                    '</div> ' +
                    '</div> ' +
                    '</div> ' +
                    '<div class="repair-list"> ' +
                    '<a href="#" class="pull-right js_del gray"> ' +
                    '<span class="iconfont icon-icon_delete"></span> 删除项目 ' +
                    '</a>' +
                    ' </div>' +
                    ' </div>';
            $(this).parents('.repair-list').append(_html);
        });

        $(document).on('click', '.js_del', function () {
            $(this).parents('.add_box').remove();
            var money = getMoney();
            $('#order_amount').text(money);
        });


        var serverId = '';
        $('.img').click(function () {
            wx.ready(function () {
                wx.chooseImage({
                    count: 1, // 默认9
                    sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图，默认二者都有
                    sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机，默认二者都有
                    success: function (res) {
                        var localIds = res.localIds;
                        $('#repair_worker_image .img').html('<img src="' + localIds[0] + '">');

                        var localId = localIds.pop();
                        wx.uploadImage({
                            localId: localId, // 需要上传的图片的本地ID，由chooseImage接口获得
                            isShowProgressTips: 1, // 默认为1，显示进度提示
                            success: function (res) {
                                serverId = res.serverId; // 返回图片的服务器端ID
                                $('#serverId').val(serverId);
                            }
                        });
                    }
                });
            });
        })
    })

    //挂起
    $('.wait').click(function () {
        $('#js_guaqi').removeClass('hide');
    });
    $('.icon-cheng1').click(function () {
        $('#js_guaqi').addClass('hide');
    });

    $('#js_guaqi .no').click(function () {
        $('#js_guaqi').addClass('hide');
        //判断yes上是否可点击提交
        if (!$("#js_guaqi .yes").hasClass("is_gua")) {
            $("#js_guaqi .yes").addClass("is_gua");
        }
    });
    $('#js_guaqi .yes').click(function () {
        var address_id = $('#address_id').val();
        if ($('#gua_id').val() < 1) {
            fm.alert('请选择挂单原因！');
            return false;
        }
        $('#js_guaqi').addClass('hide');
        //点击按钮后没返回值不能继续点击
        if ($("#js_guaqi .yes").hasClass("is_gua")) {
            $(this).removeClass("is_gua");
            $.ajax({
                type: 'post',
                url: "/Repaireast/RepaireastWorker/hangOrder",
                dataType: 'json',
                data: {
                    'order_id': $('#order_id').val(),
                    'remark_id': $('#gua_id').val(),
                    'hang_remark': $('#hang_remark').val()
                },
                success: function (data) {
                    fm.alert(data.message);
                    setTimeout(function () {
                        location.reload();
                    }, 2000);
                },
                error: function () {
                    fm.alert('通讯失败，请稍后再试');
                    $("#js_guaqi .yes").addClass("is_gua");
                }
            });
        }
    });

    //撤销订单
    $('.cancel').click(function () {
        $('#js_cancel').removeClass('hide');
    });
    $('.icon-cheng1').click(function () {
        $('#js_cancel').addClass('hide');
    });

    $('#js_cancel .no').click(function () {
        $('#js_cancel').addClass('hide');
        //判断yes上是否可点击提交
        if (!$("#js_cancel .yes").hasClass("is_gua")) {
            $("#js_cancel .yes").addClass("is_gua");
        }
    });
    $('#js_cancel .yes').click(function () {
        var address_id = $('#address_id').val();
        if ($('#cancel_id').val() < 1) {
            fm.alert('请选择撤销原因！');
            return false;
        }
        $('#js_guaqi').addClass('hide');
        //点击按钮后没返回值不能继续点击
        if ($("#js_cancel .yes").hasClass("is_gua")) {
            $(this).removeClass("is_gua");
            $.ajax({
                type: 'post',
                url: "/Repaireast/RepaireastWorker/cancelOrder",
                dataType: 'json',
                data: {
                    'order_id': $('#order_id').val(),
                    'remark_id': $('#cancel_id').val(),
                    'cancel_remark': $('#cancel_remark').val()
                },
                success: function (data) {
                    fm.alert(data.message);
                    setTimeout(function () {
                        location.reload();
                    }, 2000);
                },
                error: function () {
                    fm.alert('通讯失败，请稍后再试');
                    $("#js_cancel .yes").addClass("is_gua");
                }
            });
        }
    });
    //确认接单
    $('.confirm_taking').click(function () {
        if ($(".confirm_taking").hasClass("is_tak")) {
            $(this).removeClass("is_tak");
            $.ajax({
                type: 'post',
                url: "/Repaireast/Repaireast/updateOrderStatus",
                dataType: 'json',
                data: {
                    'order_id': $('#order_id').val(),
                    'status': 3
                },
                success: function (data) {
                    fm.alert(data.message);
                    setTimeout(function () {
                        location.reload();
                    }, 2000);
                },
                error: function () {
                    fm.alert('通讯失败，请稍后再试');
                    $(".confirm_taking").addClass("is_tak");
                }
            });
        }
    });
    //确认完成订单
    $('.confirm_finish').click(function () {
        //var image = $('#repair_worker_image img').attr('src');
        var project_child_id = $('#project_child_id').val();
        var num = $('.goods_num').val();
        var serverId = $('#serverId').val();

        /*if (!image) {
         fm.alert('请上传完成维修的图片!');
         return false;
         }*/
        /*        if('{BEESCRM:$data.type}' != 2){

         }else{
         if (project_child_id < 1){
         fm.alert('维修项目不能为空!');
         return false;
         }
         }*/
        if (num * 1 < 1) {
            num = 1;
        }

        if ($(".confirm_finish").hasClass("is_con")) {
            $(this).removeClass("is_con");

            $.ajax({
                type: 'post',
                url: "/Repaireast/Repaireast/updateOrderStatus",
                dataType: 'json',
                data: {
                    'order_id': $('#order_id').val(),
                    'status': 5,
                    'project_child_id': project_child_id,
                    'goods_num': num,
                    'serverId': serverId
                },
                success: function (data) {
                    fm.alert(data.message);
                    setTimeout(function () {
                        location.reload();
                    }, 2000);
                },
                error: function () {
                    fm.alert('通讯失败，请稍后再试');
                    $(".confirm_finish").addClass("is_con");
                }
            });
        }

    });

    //图片放大
    /* $('.images').click(function(){alert(1);
     if (!$(this).hasClass('max')){
     $(this).css('width','100%');
     $(this).css('height','auto');
     $(this).addClass('max');
     }else{
     $(this).css('width','100px');
     $(this).css('height','100px');
     $(this).removeClass('max');
     }alert($(this).css('width'));
     });*/
    $('.js_images').click(function () {
        var src = $(this).attr('src');
        $('#pop-img').removeClass('hide');
        $('.js_pop-img').attr('src', src);
    });
    $('.pop-close').click(function () {
        $('#pop-img').addClass('hide');
    });

    $(document).on('click','.goods_num_decr',function () {
        var project = $(this).parents('.repair-list').siblings().find('.project_child_id').val();
        if(project < 1){
            fm.alert('请选择报修项目');
            return false;
        }
        var num = $(this).siblings('.goods_num').val();
        if (num > 1) {
            $(this).siblings('.goods_num').val(num - 1);
        }

        /*var now_num = $(this).siblings('.goods_num').val();
         var cost = $('#project_child_id option:selected').data('cost');
         var order_amount = cost * now_num / 100;
         $('#order_amount').text(order_amount);*/
        var money = getMoney();
        $('#order_amount').text(money);
    });
    $(document).on('click','.goods_num_incr',function () {
        var project = $(this).parents('.repair-list').siblings().find('.project_child_id').val();
        if(project < 1){
            fm.alert('请选择报修项目');
            return false;
        }
        var num =$(this).siblings('.goods_num').val();
        $(this).siblings('.goods_num').val(num * 1 + 1);

        var money = getMoney();
        /*var now_num = $(this).siblings('.goods_num').val();
         var cost = $('#project_child_id option:selected').data('cost');
         var order_amount = cost * now_num / 100;*/
        $('#order_amount').text(money);
    });
    $(document).on('change','.goods_num',function () {
        var num = $(this).val();
        if (num * 1 < 1) {
            $(this).val(1);
        }

        /*var now_num = $(this).val();
         var cost = $('#project_child_id option:selected').data('cost');
         var order_amount = cost * now_num / 100;*/
        var money = getMoney();
        $('#order_amount').text(money);
    });

    $(".repair_list").delegate(".project_child_id", "change", function(){
        /*var num = $(this).siblings('.goods_num').val();
         if (num * 1 < 1) {
         $(this).siblings('.goods_num').val(1);
         }*/
        /*var cost = $('#project_child_id option:selected').data('cost');
         var order_amount = cost * num / 100;
         $('#order_amount').text(order_amount);*/
        var money = getMoney();
        $('#order_amount').text(money);
    });

    // 获取总价
    function getMoney() {
        var money = 0;
        $('.project_child_id option:selected').each(function(){
            var num = $(this).parents('.repair-list').siblings().find('.goods_num').val();
            var price = $(this).data('cost');
            money += parseInt(num)*parseFloat(price);
        });
        price =  money;
        return price.toFixed(2); // 保留两位小数
    }
    /* $('.img').click(function () {
     $('.file').click();
     });
     $(".file").fileupload({
     url:"/Base/Common/upload/is_thumb/1",//文件上传地址，当然也可以直接写在input的data-url属性内
     //        beforeSend:function(){
     //            $('.load').show();
     //        },
     done:function(e,result){
     //done方法就是上传完毕的回调函数，其他回调函数可以自行查看api
     //注意result要和jquery的ajax的data参数区分，这个对象包含了整个请求信息
     //返回的数据在result.result中，假设我们服务器返回了一个json对象
     var data=$.parseJSON(result.result);
     if(data.status=='S'){
     var html = '<img src="'+data.thumb_url+'">';
     $('#repair_worker_image .img').html(html);
     }else{
     //$.alert('error',data.message);
     fm.alert(data.message);
     return false;
     }
     }
     });*/


</script>
<include file="../footer"/>